/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package gamedsl2.impl;

import gamedsl2.AbstractEntity;
import gamedsl2.AbstractEnvironment;
import gamedsl2.ActorGame;
import gamedsl2.ActorPhysics;
import gamedsl2.Entity;
import gamedsl2.Environment;
import gamedsl2.Event;
import gamedsl2.EventTracker;
import gamedsl2.GameHolder;
import gamedsl2.Gamedsl2Factory;
import gamedsl2.Gamedsl2Package;
import gamedsl2.IEventHandler;
import gamedsl2.MapLoader;
import gamedsl2.RectangularEntity;
import gamedsl2.Sprite;
import gamedsl2.State;
import gamedsl2.Tile;
import gamedsl2.TileEnvironment;
import gamedsl2.TileSet;
import gamedsl2.TileShapes;

import gamedsl2.util.Gamedsl2Validator;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EValidator;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class Gamedsl2PackageImpl extends EPackageImpl implements Gamedsl2Package {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass environmentEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass abstractEnvironmentEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass tileEnvironmentEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass entityEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass abstractEntityEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass actorPhysicsEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass tileEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass tileShapesEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass gameHolderEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass stateEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass mapLoaderEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass rectangularEntityEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass actorGameEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass tileSetEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass eventEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iEventHandlerEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass eventTrackerEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass spriteEClass = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see gamedsl2.Gamedsl2Package#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private Gamedsl2PackageImpl() {
		super(eNS_URI, Gamedsl2Factory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link Gamedsl2Package#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static Gamedsl2Package init() {
		if (isInited) return (Gamedsl2Package)EPackage.Registry.INSTANCE.getEPackage(Gamedsl2Package.eNS_URI);

		// Obtain or create and register package
		Gamedsl2PackageImpl theGamedsl2Package = (Gamedsl2PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Gamedsl2PackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Gamedsl2PackageImpl());

		isInited = true;

		// Create package meta-data objects
		theGamedsl2Package.createPackageContents();

		// Initialize created meta-data
		theGamedsl2Package.initializePackageContents();

		// Register package validator
		EValidator.Registry.INSTANCE.put
			(theGamedsl2Package, 
			 new EValidator.Descriptor() {
				 public EValidator getEValidator() {
					 return Gamedsl2Validator.INSTANCE;
				 }
			 });

		// Mark meta-data to indicate it can't be changed
		theGamedsl2Package.freeze();

  
		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(Gamedsl2Package.eNS_URI, theGamedsl2Package);
		return theGamedsl2Package;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getEnvironment() {
		return environmentEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEnvironment_State() {
		return (EReference)environmentEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getAbstractEnvironment() {
		return abstractEnvironmentEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getAbstractEnvironment_Entities() {
		return (EReference)abstractEnvironmentEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEnvironment_GravityForce() {
		return (EAttribute)abstractEnvironmentEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEnvironment_GravityDirection() {
		return (EAttribute)abstractEnvironmentEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTileEnvironment() {
		return tileEnvironmentEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTileEnvironment_TileWidth() {
		return (EAttribute)tileEnvironmentEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTileEnvironment_TileHeight() {
		return (EAttribute)tileEnvironmentEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getEntity() {
		return entityEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEntity_EntityTriggers() {
		return (EReference)entityEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEntity_EntitySubscribers() {
		return (EReference)entityEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEntity_Environment() {
		return (EReference)entityEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getAbstractEntity() {
		return abstractEntityEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_Name() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_Type() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_XPos() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_YPos() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_Mass() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_Friction() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractEntity_Value() {
		return (EAttribute)abstractEntityEClass.getEStructuralFeatures().get(6);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getActorPhysics() {
		return actorPhysicsEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getActorPhysics_Size() {
		return (EAttribute)actorPhysicsEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getActorPhysics_GameState() {
		return (EReference)actorPhysicsEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTile() {
		return tileEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTileShapes() {
		return tileShapesEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getGameHolder() {
		return gameHolderEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getGameHolder_States() {
		return (EReference)gameHolderEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getGameHolder_Tracker() {
		return (EReference)gameHolderEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getGameHolder_MapLoader() {
		return (EReference)gameHolderEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getGameHolder_TileShapes() {
		return (EReference)gameHolderEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getGameHolder_Name() {
		return (EAttribute)gameHolderEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getGameHolder_Vsync() {
		return (EAttribute)gameHolderEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getGameHolder_FullScreen() {
		return (EAttribute)gameHolderEClass.getEStructuralFeatures().get(6);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getGameHolder_TargetFps() {
		return (EAttribute)gameHolderEClass.getEStructuralFeatures().get(7);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getGameHolder_CurrentState() {
		return (EReference)gameHolderEClass.getEStructuralFeatures().get(8);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getState() {
		return stateEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getState_Player() {
		return (EReference)stateEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getState_Environment() {
		return (EReference)stateEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getState_GameStateTriggers() {
		return (EReference)stateEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_Id() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_Name() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_BackgroundImage() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MoveForce() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(6);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_JumpForce() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(7);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MoveUp() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(8);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MoveDown() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(9);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MoveLeft() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(10);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MoveRight() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(11);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_ActionButtonA() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(12);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_ActionButtonB() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(13);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_TilesFile() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(14);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getState_MapFile() {
		return (EAttribute)stateEClass.getEStructuralFeatures().get(15);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getState_GameStateSubscribers() {
		return (EReference)stateEClass.getEStructuralFeatures().get(16);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMapLoader() {
		return mapLoaderEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMapLoader_Set() {
		return (EReference)mapLoaderEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getRectangularEntity() {
		return rectangularEntityEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getRectangularEntity_Width() {
		return (EAttribute)rectangularEntityEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getRectangularEntity_Height() {
		return (EAttribute)rectangularEntityEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getRectangularEntity_ImageFile() {
		return (EAttribute)rectangularEntityEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getActorGame() {
		return actorGameEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getActorGame_Sprites() {
		return (EReference)actorGameEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTileSet() {
		return tileSetEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getTileSet_Tile() {
		return (EReference)tileSetEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getEvent() {
		return eventEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getEvent_Message() {
		return (EAttribute)eventEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getEvent_Name() {
		return (EAttribute)eventEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getEvent_Type() {
		return (EAttribute)eventEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEvent_TriggerEntity() {
		return (EReference)eventEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEvent_SubscriberEntities() {
		return (EReference)eventEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEvent_TriggerGameState() {
		return (EReference)eventEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEvent_SubscriberGameStates() {
		return (EReference)eventEClass.getEStructuralFeatures().get(6);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIEventHandler() {
		return iEventHandlerEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getEventTracker() {
		return eventTrackerEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEventTracker_Events() {
		return (EReference)eventTrackerEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getSprite() {
		return spriteEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getSprite_Name() {
		return (EAttribute)spriteEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getSprite_Image() {
		return (EAttribute)spriteEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getSprite_TileWidth() {
		return (EAttribute)spriteEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getSprite_TileHeight() {
		return (EAttribute)spriteEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getSprite_Spacing() {
		return (EAttribute)spriteEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Gamedsl2Factory getGamedsl2Factory() {
		return (Gamedsl2Factory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		environmentEClass = createEClass(ENVIRONMENT);
		createEReference(environmentEClass, ENVIRONMENT__STATE);

		abstractEnvironmentEClass = createEClass(ABSTRACT_ENVIRONMENT);
		createEReference(abstractEnvironmentEClass, ABSTRACT_ENVIRONMENT__ENTITIES);
		createEAttribute(abstractEnvironmentEClass, ABSTRACT_ENVIRONMENT__GRAVITY_FORCE);
		createEAttribute(abstractEnvironmentEClass, ABSTRACT_ENVIRONMENT__GRAVITY_DIRECTION);

		tileEnvironmentEClass = createEClass(TILE_ENVIRONMENT);
		createEAttribute(tileEnvironmentEClass, TILE_ENVIRONMENT__TILE_WIDTH);
		createEAttribute(tileEnvironmentEClass, TILE_ENVIRONMENT__TILE_HEIGHT);

		entityEClass = createEClass(ENTITY);
		createEReference(entityEClass, ENTITY__ENTITY_TRIGGERS);
		createEReference(entityEClass, ENTITY__ENTITY_SUBSCRIBERS);
		createEReference(entityEClass, ENTITY__ENVIRONMENT);

		abstractEntityEClass = createEClass(ABSTRACT_ENTITY);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__NAME);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__TYPE);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__XPOS);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__YPOS);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__MASS);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__FRICTION);
		createEAttribute(abstractEntityEClass, ABSTRACT_ENTITY__VALUE);

		actorPhysicsEClass = createEClass(ACTOR_PHYSICS);
		createEAttribute(actorPhysicsEClass, ACTOR_PHYSICS__SIZE);
		createEReference(actorPhysicsEClass, ACTOR_PHYSICS__GAME_STATE);

		tileEClass = createEClass(TILE);

		tileShapesEClass = createEClass(TILE_SHAPES);

		gameHolderEClass = createEClass(GAME_HOLDER);
		createEReference(gameHolderEClass, GAME_HOLDER__STATES);
		createEReference(gameHolderEClass, GAME_HOLDER__TRACKER);
		createEReference(gameHolderEClass, GAME_HOLDER__MAP_LOADER);
		createEReference(gameHolderEClass, GAME_HOLDER__TILE_SHAPES);
		createEAttribute(gameHolderEClass, GAME_HOLDER__NAME);
		createEAttribute(gameHolderEClass, GAME_HOLDER__VSYNC);
		createEAttribute(gameHolderEClass, GAME_HOLDER__FULL_SCREEN);
		createEAttribute(gameHolderEClass, GAME_HOLDER__TARGET_FPS);
		createEReference(gameHolderEClass, GAME_HOLDER__CURRENT_STATE);

		stateEClass = createEClass(STATE);
		createEReference(stateEClass, STATE__PLAYER);
		createEReference(stateEClass, STATE__ENVIRONMENT);
		createEReference(stateEClass, STATE__GAME_STATE_TRIGGERS);
		createEAttribute(stateEClass, STATE__ID);
		createEAttribute(stateEClass, STATE__NAME);
		createEAttribute(stateEClass, STATE__BACKGROUND_IMAGE);
		createEAttribute(stateEClass, STATE__MOVE_FORCE);
		createEAttribute(stateEClass, STATE__JUMP_FORCE);
		createEAttribute(stateEClass, STATE__MOVE_UP);
		createEAttribute(stateEClass, STATE__MOVE_DOWN);
		createEAttribute(stateEClass, STATE__MOVE_LEFT);
		createEAttribute(stateEClass, STATE__MOVE_RIGHT);
		createEAttribute(stateEClass, STATE__ACTION_BUTTON_A);
		createEAttribute(stateEClass, STATE__ACTION_BUTTON_B);
		createEAttribute(stateEClass, STATE__TILES_FILE);
		createEAttribute(stateEClass, STATE__MAP_FILE);
		createEReference(stateEClass, STATE__GAME_STATE_SUBSCRIBERS);

		mapLoaderEClass = createEClass(MAP_LOADER);
		createEReference(mapLoaderEClass, MAP_LOADER__SET);

		rectangularEntityEClass = createEClass(RECTANGULAR_ENTITY);
		createEAttribute(rectangularEntityEClass, RECTANGULAR_ENTITY__WIDTH);
		createEAttribute(rectangularEntityEClass, RECTANGULAR_ENTITY__HEIGHT);
		createEAttribute(rectangularEntityEClass, RECTANGULAR_ENTITY__IMAGE_FILE);

		actorGameEClass = createEClass(ACTOR_GAME);
		createEReference(actorGameEClass, ACTOR_GAME__SPRITES);

		tileSetEClass = createEClass(TILE_SET);
		createEReference(tileSetEClass, TILE_SET__TILE);

		eventEClass = createEClass(EVENT);
		createEAttribute(eventEClass, EVENT__MESSAGE);
		createEAttribute(eventEClass, EVENT__NAME);
		createEAttribute(eventEClass, EVENT__TYPE);
		createEReference(eventEClass, EVENT__TRIGGER_ENTITY);
		createEReference(eventEClass, EVENT__SUBSCRIBER_ENTITIES);
		createEReference(eventEClass, EVENT__TRIGGER_GAME_STATE);
		createEReference(eventEClass, EVENT__SUBSCRIBER_GAME_STATES);

		iEventHandlerEClass = createEClass(IEVENT_HANDLER);

		eventTrackerEClass = createEClass(EVENT_TRACKER);
		createEReference(eventTrackerEClass, EVENT_TRACKER__EVENTS);

		spriteEClass = createEClass(SPRITE);
		createEAttribute(spriteEClass, SPRITE__NAME);
		createEAttribute(spriteEClass, SPRITE__IMAGE);
		createEAttribute(spriteEClass, SPRITE__TILE_WIDTH);
		createEAttribute(spriteEClass, SPRITE__TILE_HEIGHT);
		createEAttribute(spriteEClass, SPRITE__SPACING);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		abstractEnvironmentEClass.getESuperTypes().add(this.getEnvironment());
		tileEnvironmentEClass.getESuperTypes().add(this.getAbstractEnvironment());
		entityEClass.getESuperTypes().add(this.getIEventHandler());
		abstractEntityEClass.getESuperTypes().add(this.getEntity());
		actorPhysicsEClass.getESuperTypes().add(this.getAbstractEntity());
		stateEClass.getESuperTypes().add(this.getIEventHandler());
		rectangularEntityEClass.getESuperTypes().add(this.getAbstractEntity());
		actorGameEClass.getESuperTypes().add(this.getActorPhysics());

		// Initialize classes and features; add operations and parameters
		initEClass(environmentEClass, Environment.class, "Environment", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getEnvironment_State(), this.getState(), this.getState_Environment(), "state", null, 1, 1, Environment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(abstractEnvironmentEClass, AbstractEnvironment.class, "AbstractEnvironment", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getAbstractEnvironment_Entities(), this.getEntity(), this.getEntity_Environment(), "entities", null, 0, -1, AbstractEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEnvironment_GravityForce(), ecorePackage.getEFloat(), "gravityForce", null, 0, 1, AbstractEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEnvironment_GravityDirection(), ecorePackage.getEFloat(), "gravityDirection", null, 0, 1, AbstractEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(tileEnvironmentEClass, TileEnvironment.class, "TileEnvironment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getTileEnvironment_TileWidth(), ecorePackage.getEInt(), "tileWidth", null, 0, 1, TileEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTileEnvironment_TileHeight(), ecorePackage.getEInt(), "tileHeight", null, 0, 1, TileEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(entityEClass, Entity.class, "Entity", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getEntity_EntityTriggers(), this.getEvent(), this.getEvent_TriggerEntity(), "entityTriggers", null, 0, -1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEntity_EntitySubscribers(), this.getEvent(), this.getEvent_SubscriberEntities(), "entitySubscribers", null, 0, -1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEntity_Environment(), this.getAbstractEnvironment(), this.getAbstractEnvironment_Entities(), "environment", null, 1, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(abstractEntityEClass, AbstractEntity.class, "AbstractEntity", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getAbstractEntity_Name(), ecorePackage.getEString(), "name", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_Type(), ecorePackage.getEString(), "type", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_XPos(), ecorePackage.getEFloat(), "xPos", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_YPos(), ecorePackage.getEFloat(), "yPos", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_Mass(), ecorePackage.getEFloat(), "mass", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_Friction(), ecorePackage.getEFloat(), "friction", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getAbstractEntity_Value(), ecorePackage.getEInt(), "value", null, 0, 1, AbstractEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(actorPhysicsEClass, ActorPhysics.class, "ActorPhysics", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getActorPhysics_Size(), ecorePackage.getEFloat(), "size", null, 0, 1, ActorPhysics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getActorPhysics_GameState(), this.getState(), this.getState_Player(), "gameState", null, 1, 1, ActorPhysics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(tileEClass, Tile.class, "Tile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(tileShapesEClass, TileShapes.class, "TileShapes", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(gameHolderEClass, GameHolder.class, "GameHolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getGameHolder_States(), this.getState(), null, "states", null, 1, -1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getGameHolder_Tracker(), this.getEventTracker(), null, "tracker", null, 1, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getGameHolder_MapLoader(), this.getMapLoader(), null, "mapLoader", null, 1, -1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getGameHolder_TileShapes(), this.getTileShapes(), null, "tileShapes", null, 1, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getGameHolder_Name(), ecorePackage.getEString(), "name", null, 0, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getGameHolder_Vsync(), ecorePackage.getEBoolean(), "vsync", "true", 0, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getGameHolder_FullScreen(), ecorePackage.getEBoolean(), "fullScreen", null, 0, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getGameHolder_TargetFps(), ecorePackage.getEInt(), "targetFps", null, 0, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getGameHolder_CurrentState(), this.getState(), null, "currentState", null, 1, 1, GameHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getState_Player(), this.getActorPhysics(), this.getActorPhysics_GameState(), "player", null, 1, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getState_Environment(), this.getEnvironment(), this.getEnvironment_State(), "environment", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getState_GameStateTriggers(), this.getEvent(), this.getEvent_TriggerGameState(), "gameStateTriggers", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_Id(), ecorePackage.getEInt(), "id", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_Name(), ecorePackage.getEString(), "name", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_BackgroundImage(), ecorePackage.getEString(), "backgroundImage", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MoveForce(), ecorePackage.getEFloat(), "moveForce", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_JumpForce(), ecorePackage.getEFloat(), "jumpForce", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MoveUp(), ecorePackage.getEString(), "moveUp", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MoveDown(), ecorePackage.getEString(), "moveDown", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MoveLeft(), ecorePackage.getEString(), "moveLeft", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MoveRight(), ecorePackage.getEString(), "moveRight", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_ActionButtonA(), ecorePackage.getEString(), "actionButtonA", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_ActionButtonB(), ecorePackage.getEString(), "actionButtonB", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_TilesFile(), ecorePackage.getEString(), "tilesFile", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getState_MapFile(), ecorePackage.getEString(), "mapFile", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getState_GameStateSubscribers(), this.getEvent(), this.getEvent_SubscriberGameStates(), "gameStateSubscribers", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		EOperation op = addEOperation(stateEClass, ecorePackage.getEBoolean(), "isSubString", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "src", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "tgt", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(stateEClass, ecorePackage.getEBoolean(), "isValidImageFileType", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "src", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(stateEClass, ecorePackage.getEBoolean(), "isMapImageFileType", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "src", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(stateEClass, ecorePackage.getEBoolean(), "isTilesFileType", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "src", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(mapLoaderEClass, MapLoader.class, "MapLoader", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getMapLoader_Set(), this.getTileSet(), null, "set", null, 1, 1, MapLoader.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(rectangularEntityEClass, RectangularEntity.class, "RectangularEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getRectangularEntity_Width(), ecorePackage.getEFloat(), "width", null, 0, 1, RectangularEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getRectangularEntity_Height(), ecorePackage.getEFloat(), "height", null, 0, 1, RectangularEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getRectangularEntity_ImageFile(), ecorePackage.getEString(), "imageFile", null, 0, 1, RectangularEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(actorGameEClass, ActorGame.class, "ActorGame", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getActorGame_Sprites(), this.getSprite(), null, "sprites", null, 0, -1, ActorGame.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(tileSetEClass, TileSet.class, "TileSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getTileSet_Tile(), this.getTile(), null, "tile", null, 0, -1, TileSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(eventEClass, Event.class, "Event", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getEvent_Message(), ecorePackage.getEString(), "message", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getEvent_Type(), ecorePackage.getEString(), "type", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEvent_TriggerEntity(), this.getEntity(), this.getEntity_EntityTriggers(), "triggerEntity", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEvent_SubscriberEntities(), this.getEntity(), this.getEntity_EntitySubscribers(), "subscriberEntities", null, 0, -1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEvent_TriggerGameState(), this.getState(), this.getState_GameStateTriggers(), "triggerGameState", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEvent_SubscriberGameStates(), this.getState(), this.getState_GameStateSubscribers(), "subscriberGameStates", null, 0, -1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(iEventHandlerEClass, IEventHandler.class, "IEventHandler", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(eventTrackerEClass, EventTracker.class, "EventTracker", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getEventTracker_Events(), this.getEvent(), null, "events", null, 0, -1, EventTracker.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(spriteEClass, Sprite.class, "Sprite", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getSprite_Name(), ecorePackage.getEString(), "name", null, 0, 1, Sprite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSprite_Image(), ecorePackage.getEString(), "image", null, 0, 1, Sprite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSprite_TileWidth(), ecorePackage.getEInt(), "tileWidth", null, 0, 1, Sprite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSprite_TileHeight(), ecorePackage.getEInt(), "tileHeight", null, 0, 1, Sprite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSprite_Spacing(), ecorePackage.getEInt(), "spacing", null, 0, 1, Sprite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Create resource
		createResource(eNS_URI);

		// Create annotations
		// http://www.eclipse.org/emf/2002/Ecore
		createEcoreAnnotations();
		// http://www.eclipse.org/emf/2002/Ecore/OCL
		createOCLAnnotations();
	}

	/**
	 * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void createEcoreAnnotations() {
		String source = "http://www.eclipse.org/emf/2002/Ecore";		
		addAnnotation
		  (this, 
		   source, 
		   new String[] {
			 "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL",
			 "settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL",
			 "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL"
		   });		
		addAnnotation
		  (tileEnvironmentEClass, 
		   source, 
		   new String[] {
			 "constraints", "TE1_TileWidthGreaterThanZero TE1_TileHeightGreaterThanZero"
		   });			
		addAnnotation
		  (abstractEntityEClass, 
		   source, 
		   new String[] {
			 "constraints", "AE7_yPosGreaterThanZero AE1_TypeMustBeDefined AE3_NameMustNotBeEmptyString AE5_TypeMustNotBeEmptyString AE2_NameMustBeSet AE4_MassBeGreaterThanZero AE6_xPosGreaterThanZero"
		   });			
		addAnnotation
		  (gameHolderEClass, 
		   source, 
		   new String[] {
			 "constraints", "GH5_gameHolderName GH6_uniqueStateName GH2_minMapLoader GH4_minStates GH7_uniqueStateId GH1_maxEventTracker GH3_maxTilShapes"
		   });			
		addAnnotation
		  (stateEClass, 
		   source, 
		   new String[] {
			 "constraints", "G3_PlayerAssignedToGameStateNotContainingItsEnvironment S18_StateMoveDownMustBeSet S2_stateHasPlayer S1_stateHasEnvironment S15_StateMoveLeftMustBeSet S6_UniqueDirectionalKeyValues S10_ValidMapFile S11_ValidTilesFile S8_StateIdMustBeSet S4_jumpForceChecker S16_StateMoveRightMustBeSet S12_StateBackgroundImageMustBeSet S19_StateActionButtonAMustBeSet S17_StateMoveUpMustBeSet S13_StateTilesFileMustBeSet S9_ValidBackgroundImageFileType S7_StateNameMustBeSet S14_StateMapFileMustBeSet"
		   });							
		addAnnotation
		  (rectangularEntityEClass, 
		   source, 
		   new String[] {
			 "constraints", "RE1_HeightGreaterZero RE1_WidthGreaterZero"
		   });			
		addAnnotation
		  (eventEClass, 
		   source, 
		   new String[] {
			 "constraints", "E2_SizeOfName E4_OnlyOneTrigger E3_SizeOfMessage G2_IfSubscriberThenTrigger G1_AtLeastOneSubscriberToTriggeredEvent"
		   });	
	}

	/**
	 * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void createOCLAnnotations() {
		String source = "http://www.eclipse.org/emf/2002/Ecore/OCL";				
		addAnnotation
		  (tileEnvironmentEClass, 
		   source, 
		   new String[] {
			 "TE1_TileWidthGreaterThanZero", "tileWidth > 0",
			 "TE1_TileHeightGreaterThanZero", "tileHeight > 0"
		   });			
		addAnnotation
		  (abstractEntityEClass, 
		   source, 
		   new String[] {
			 "AE7_yPosGreaterThanZero", "yPos > 0",
			 "AE1_TypeMustBeDefined", "type.oclIsUndefined() = false",
			 "AE3_NameMustNotBeEmptyString", "name <> \'\'",
			 "AE5_TypeMustNotBeEmptyString", "type <> \'\'",
			 "AE2_NameMustBeSet", "name.oclIsUndefined() = false",
			 "AE4_MassBeGreaterThanZero", "mass > 0",
			 "AE6_xPosGreaterThanZero", "xPos > 0"
		   });			
		addAnnotation
		  (gameHolderEClass, 
		   source, 
		   new String[] {
			 "GH5_gameHolderName", "name -> notEmpty()",
			 "GH6_uniqueStateName", "states.name->size()=states.name->asSet()->size()",
			 "GH2_minMapLoader", "mapLoader -> size() >= 1",
			 "GH4_minStates", "states -> size() >= 1",
			 "GH7_uniqueStateId", "states.id->size()=states.id->asSet()->size()",
			 "GH1_maxEventTracker", "tracker -> size() = 1",
			 "GH3_maxTilShapes", "tileShapes -> size() = 1"
		   });			
		addAnnotation
		  (stateEClass, 
		   source, 
		   new String[] {
			 "G3_PlayerAssignedToGameStateNotContainingItsEnvironment", "\n\t\t\tlet env : AbstractEnvironment = self.environment.oclAsType(AbstractEnvironment) in\n\t\t\tlet actors : Set(ActorPhysics) = env.entities->select(oclIsTypeOf(ActorGame)).oclAsType(ActorPhysics)->asSet() in\n\t\t\tactors->includesAll(self.player)",
			 "S18_StateMoveDownMustBeSet", "moveDown.oclIsUndefined()=false",
			 "S2_stateHasPlayer", "player->size()>0",
			 "S1_stateHasEnvironment", "environment->size()<=1",
			 "S15_StateMoveLeftMustBeSet", "moveLeft.oclIsUndefined()=false",
			 "S6_UniqueDirectionalKeyValues", "\n\t\t\tlet numOfUniqueDirKeys :Integer = 6 in\n\t\t\tlet allDirectionalKeyValues : Set(String)= self.actionButtonA->union(self.actionButtonB->union(self.moveDown->union(self.moveLeft->union(self.moveRight->union(self.moveUp->asSet()))))) in\n\t\t\t allDirectionalKeyValues->size() = numOfUniqueDirKeys",
			 "S10_ValidMapFile", "isMapImageFileType(self.mapFile) = true",
			 "S11_ValidTilesFile", "isTilesFileType(self.tilesFile) = true",
			 "S8_StateIdMustBeSet", "id.oclIsUndefined()=false",
			 "S4_jumpForceChecker", "jumpForce>10000 and jumpForce<50000",
			 "S16_StateMoveRightMustBeSet", "moveRight.oclIsUndefined()=false",
			 "S12_StateBackgroundImageMustBeSet", "backgroundImage.oclIsUndefined()=false",
			 "S19_StateActionButtonAMustBeSet", "actionButtonA.oclIsUndefined()=false",
			 "S17_StateMoveUpMustBeSet", "moveUp.oclIsUndefined()=false",
			 "S13_StateTilesFileMustBeSet", "tilesFile.oclIsUndefined()=false",
			 "S9_ValidBackgroundImageFileType", "isValidImageFileType(self.backgroundImage) = true",
			 "S7_StateNameMustBeSet", "name.oclIsUndefined()=false",
			 "S14_StateMapFileMustBeSet", "mapFile.oclIsUndefined()=false"
		   });		
		addAnnotation
		  (stateEClass.getEOperations().get(0), 
		   source, 
		   new String[] {
			 "body", "\n\t\t\t let endIndex : Integer = src.size() in\n\t\t\t let startIndex : Integer = tgt.size()-1 in\n\t\t\t src.substring(endIndex-startIndex,endIndex)->intersection(tgt->asSet())->size() = 1"
		   });		
		addAnnotation
		  (stateEClass.getEOperations().get(1), 
		   source, 
		   new String[] {
			 "body", "\n\t\t\t\tlet ft:Set(String) = Set{\'.png\',\'.gif\',\'.jpg\'} in\n\t\t\t\tlet results: Integer = ft->any(f:String | self.isSubString(src,f) = true)->size() in\n\t\t\t\tif results = 1 then\n\t\t\t\t\ttrue\n\t\t\t\telse false\n\t\t\t\tendif"
		   });		
		addAnnotation
		  (stateEClass.getEOperations().get(2), 
		   source, 
		   new String[] {
			 "body", "\n\t\t\t\tlet ft:Set(String) = Set{\'.txt\'} in\n\t\t\t\tlet results: Integer = ft->any(f:String | self.isSubString(src,f) = true)->size() in\n\t\t\t\tif results = 1 then\n\t\t\t\t\ttrue\n\t\t\t\telse false\n\t\t\t\tendif"
		   });		
		addAnnotation
		  (stateEClass.getEOperations().get(3), 
		   source, 
		   new String[] {
			 "body", "\n\t\t\t\tlet ft:Set(String) = Set{\'.xml\'} in\n\t\t\t\tlet results: Integer = ft->any(f:String | self.isSubString(src,f) = true)->size() in\n\t\t\t\tif results = 1 then\n\t\t\t\t\ttrue\n\t\t\t\telse false\n\t\t\t\tendif"
		   });			
		addAnnotation
		  (rectangularEntityEClass, 
		   source, 
		   new String[] {
			 "RE1_HeightGreaterZero", "height > 0",
			 "RE1_WidthGreaterZero", "width > 0"
		   });			
		addAnnotation
		  (eventEClass, 
		   source, 
		   new String[] {
			 "E2_SizeOfName", "name.size() <= 30",
			 "E4_OnlyOneTrigger", "let numOfTriggers : Integer = triggerEntity->size() + triggerGameState->size()\n\t\t\t\t\t\t\t\t\tin numOfTriggers <= 1",
			 "E3_SizeOfMessage", "message.size() <= 30",
			 "G2_IfSubscriberThenTrigger", "\n\t\t\tlet numOfTriggers : Integer = triggerEntity->size() + triggerGameState->size() in\n\t\t\tlet numOfSubscribers : Integer = subscriberEntities->size() + subscriberGameStates->size() in\n\t\t\tnumOfSubscribers > 0 implies numOfTriggers = 1",
			 "G1_AtLeastOneSubscriberToTriggeredEvent", "\n\t\t\tlet numOfTriggers : Integer = triggerEntity->size() + triggerGameState->size() in\n\t\t\tlet numOfSubscribers : Integer = subscriberEntities->size() + subscriberGameStates->size() in\n\t\t\tnumOfTriggers = 1 implies numOfSubscribers > 0"
		   });
	}

} //Gamedsl2PackageImpl
